.class public Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;
.super Ljava/lang/Object;
.source "TapjoyRequestBuilder.java"

# interfaces
.implements Lcom/melesta/payment/interfaces/IRequestBuilder;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$1;,
        Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$TapjoyAction;
    }
.end annotation


# static fields
.field private static final ACTION_TAG:Ljava/lang/String; = "action"

.field private static final CURRENCY_TAG:Ljava/lang/String; = "currency"

.field private static final IGNORE_ERRORS_TAG:Ljava/lang/String; = "ignoreErrors"

.field private static final NAME_TAG:Ljava/lang/String; = "name"


# instance fields
.field private action:Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$TapjoyAction;

.field private currencyName:Ljava/lang/String;

.field private ignoreErrors:Z

.field private name:Ljava/lang/String;

.field private system:Lcom/melesta/payment/tapjoy/TapjoySystem;


# direct methods
.method public constructor <init>(Lcom/melesta/payment/tapjoy/TapjoySystem;)V
    .locals 0
    .parameter "system"

    .prologue
    .line 18
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 19
    iput-object p1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->system:Lcom/melesta/payment/tapjoy/TapjoySystem;

    .line 20
    return-void
.end method


# virtual methods
.method public createRequest()Lcom/melesta/payment/interfaces/IRequest;
    .locals 2

    .prologue
    .line 42
    sget-object v0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$1;->$SwitchMap$com$melesta$payment$tapjoy$TapjoyRequestBuilder$TapjoyAction:[I

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->action:Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$TapjoyAction;

    invoke-virtual {v1}, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$TapjoyAction;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    .line 54
    const/4 v0, 0x0

    :goto_0
    return-object v0

    .line 44
    :pswitch_0
    new-instance v0, Lcom/melesta/payment/tapjoy/TapjoyOffersRequest;

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->system:Lcom/melesta/payment/tapjoy/TapjoySystem;

    invoke-direct {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyOffersRequest;-><init>(Lcom/melesta/payment/tapjoy/TapjoySystem;)V

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->name:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyOffersRequest;->setName(Ljava/lang/String;)Lcom/melesta/payment/tapjoy/TapjoyRequest;

    move-result-object v0

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->currencyName:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyRequest;->setCurrencyName(Ljava/lang/String;)Lcom/melesta/payment/tapjoy/TapjoyRequest;

    move-result-object v0

    goto :goto_0

    .line 47
    :pswitch_1
    new-instance v0, Lcom/melesta/payment/tapjoy/TapjoyListenerRequest;

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->system:Lcom/melesta/payment/tapjoy/TapjoySystem;

    invoke-direct {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyListenerRequest;-><init>(Lcom/melesta/payment/tapjoy/TapjoySystem;)V

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->name:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyListenerRequest;->setName(Ljava/lang/String;)Lcom/melesta/payment/tapjoy/TapjoyRequest;

    move-result-object v0

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->currencyName:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyRequest;->setCurrencyName(Ljava/lang/String;)Lcom/melesta/payment/tapjoy/TapjoyRequest;

    move-result-object v0

    goto :goto_0

    .line 50
    :pswitch_2
    new-instance v0, Lcom/melesta/payment/tapjoy/TapjoyRefreshRequest;

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->system:Lcom/melesta/payment/tapjoy/TapjoySystem;

    invoke-direct {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyRefreshRequest;-><init>(Lcom/melesta/payment/tapjoy/TapjoySystem;)V

    iget-boolean v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->ignoreErrors:Z

    invoke-virtual {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyRefreshRequest;->setIgnoreErrors(Z)Lcom/melesta/payment/tapjoy/TapjoyRefreshRequest;

    move-result-object v0

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->name:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyRefreshRequest;->setName(Ljava/lang/String;)Lcom/melesta/payment/tapjoy/TapjoyRequest;

    move-result-object v0

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->currencyName:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/melesta/payment/tapjoy/TapjoyRequest;->setCurrencyName(Ljava/lang/String;)Lcom/melesta/payment/tapjoy/TapjoyRequest;

    move-result-object v0

    goto :goto_0

    .line 42
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public get(Ljava/lang/String;)Ljava/lang/Object;
    .locals 2
    .parameter "param"

    .prologue
    .line 76
    const-string v0, "action"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 77
    iget-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->action:Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$TapjoyAction;

    .line 85
    :goto_0
    return-object v0

    .line 78
    :cond_0
    const-string v0, "name"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 79
    iget-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->name:Ljava/lang/String;

    goto :goto_0

    .line 80
    :cond_1
    const-string v0, "currency"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 81
    iget-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->currencyName:Ljava/lang/String;

    goto :goto_0

    .line 82
    :cond_2
    const-string v0, "ignoreErrors"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 83
    new-instance v0, Ljava/lang/Boolean;

    iget-boolean v1, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->ignoreErrors:Z

    invoke-direct {v0, v1}, Ljava/lang/Boolean;-><init>(Z)V

    goto :goto_0

    .line 85
    :cond_3
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public bridge synthetic set(Ljava/lang/String;Ljava/lang/Object;)Lcom/melesta/payment/interfaces/IRequestBuilder;
    .locals 1
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 6
    invoke-virtual {p0, p1, p2}, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->set(Ljava/lang/String;Ljava/lang/Object;)Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;

    move-result-object v0

    return-object v0
.end method

.method public set(Ljava/lang/String;Ljava/lang/Object;)Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;
    .locals 3
    .parameter "param"
    .parameter "value"

    .prologue
    .line 59
    const-string v0, "action"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 60
    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$TapjoyAction;->getAction(Ljava/lang/String;)Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$TapjoyAction;

    move-result-object v0

    iput-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->action:Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$TapjoyAction;

    .line 61
    iget-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->action:Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder$TapjoyAction;

    if-nez v0, :cond_1

    .line 62
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Action: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 64
    :cond_0
    const-string v0, "name"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 65
    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->name:Ljava/lang/String;

    .line 71
    :cond_1
    :goto_0
    return-object p0

    .line 66
    :cond_2
    const-string v0, "currency"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 67
    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->currencyName:Ljava/lang/String;

    goto :goto_0

    .line 68
    :cond_3
    const-string v0, "ignoreErrors"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 69
    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Boolean;->parseBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;->ignoreErrors:Z

    goto :goto_0
.end method
